#!/bin/env python
# -*- coding: utf-8 -*-

"""
File Name: util.py
Author: morre <morre@vip.qq.com>
Create Time: 2022/12/31 17:08:04
Brief:
"""

from __future__ import absolute_import

def partition(ls, size):
    """
    Returns a new list with elements
    of which is a list of certain size.
    """
    return [ls[i:i+size] for i in range(0, len(ls), size)]
